Break


Exits (terminates) a loop. Valid only inside a loop.

Break

The Break command applies to the innermost loop in which it is enclosed. The use of Break and Continue are encouraged over goto since they usually make scripts more readable and maintainable.

Related

Loop, Continue, Blocks

Example

loop
{
    ...
    if var > 25
        break
    ...
    if var <= 5
        continue
}